]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shellEntry: Destroy entry menus when the entry actors are destroyed
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 4 Apr 2013 15:35:50 +0000 (11:35 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 4 Apr 2013 19:04:14 +0000 (15:04 -0400)
This ensures that a menu and manager aren't sticking around.

https://bugzilla.gnome.org/show_bug.cgi?id=697295

js/ui/shellEntry.js

index 61e43a9e3ee4cb742cadc0fc6cbb4ff529468cf7..2256af07000518ced6c5e2f0822e45f36e4d71e9 100644 (file)
@@ -171,4 +171,10 @@ function addContextMenu(entry, params) {
     entry.connect('button-press-event', Lang.bind(null, _onButtonPressEvent, entry));
 
     entry.connect('popup-menu', Lang.bind(null, _onPopup, entry));
+
+    entry.connect('destroy', function() {
+        entry.menu.destroy();
+        entry.menu = null;
+        entry._menuManager = null;
+    });
 }